import NodeMediaServer from "node-media-server";

const server = new NodeMediaServer({
    bind: "192.168.124.144",
    // 推流
    rtmp: {
        port: 1935,
        chunk_size: 60000, //传输大小 60kb
        gop_cache: true, //是否缓存
        ping: 60, //心跳
        ping_timeout: 30, //心跳超时
    },
    // 拉流
    http: {
        port: 8000,
        allow_origin: '*',
    },
})

server.run();

console.log('Server is running on port 8000');